package com.behelpful.demo.quartz.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.behelpful.common.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;

/**
 * Quartz 执行错失策略
 *
 * @author Alay
 * @date 2021-10-31 17:18
 * @since
 */
@Getter
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MisfirePolicyEnum implements IEnum {

    /**
     * 错失周期立即执行
     */
    IMMEDIATELY(1),
    /**
     * 下周期执行
     */
    NEXT_PERIOD(2);


    @EnumValue
    private int code;


    MisfirePolicyEnum(int code) {
        this.code = code;
    }
}
